---
title: Charmhub | Deploy Parca Agent using Charmhub - The Open Operator Collection
description: Deploy the latest version of Parca Agent on any cloud.
url: https://charmhub.io/parca-agent/docs/Profile a Canonical Kubernetes cluster with
  parca-agent
---

# Parca Agent

[Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

* [Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

Platform:

26.04

24.04

22.04

0.35/stable d643c54

```
juju deploy parca-agent --channel 0.35/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Relevant links

* [Homepage](https://charmhub.io/parca-agent)

---

#### Contacts

* [Submit a bug](https://github.com/canonical/parca-agent-operator/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

You can use [parca-agent](https://charmhub.io/parca-agent/docs), part of [Charmed Parca](https://discourse.charmhub.io/t/charmed-parca/16549) to gather profiles from [a Canonical Kubernetes cluster](https://documentation.ubuntu.com/canonical-kubernetes/latest/). This document describes how.

> This document assumes you already have deployed Canonical Kubernetes either [from a snap](https://documentation.ubuntu.com/canonical-kubernetes/latest/snap/tutorial/getting-started/) or [as a charm](https://documentation.ubuntu.com/canonical-kubernetes/latest/charm/tutorial/getting-started/). It also assumes you have already deployed Parca alongside with COS-Lite. If you haven’t done so, see more: [How to deploy Charmed Parca on top of COS-Lite](https://discourse.charmhub.io/t/how-to-deploy-charmed-parca-on-top-of-cos-lite/16579)

# Get profiles from a charmed Canonical Kubernetes cluster

In the model where Parca is deployed, create an offer for the `parca-store` endpoint:

```
juju offer parca:parca-store-endpoint parca-store
```

Switch to the machine model where Canonical Kubernetes is deployed, consume the offer you just created:

```
juju consume k8s:admin/cos.parca-store
```

Then deploy parca-agent:

```
juju deploy parca-agent --channel edge
```

And integrate:

```
juju integrate parca-agent parca-store
juju integrate parca-agent k8s
```

Now open grafana in a browser (in the cos model, run `juju run grafana/leader get-admin-password`).
In Grafana’s Explore view, select the Parca datasource and verify there’s `parca_agent` in the profiles tab. If you deployed COS on the same Kubernetes cluster that is being profiled, you should be able to see profiles from each of the applications that parca can natively instrument:

> If you don’t see any profiles from parca-agent, check if your machine has all the requirements from [How to autoinstrument machine workloads with parca-agent](https://charmhub.io/parca-agent/docs/Autoinstrument machine charms with parca-agent) . If it does and you still don’t receive any profiles, check `juju debug-log` on the parca-agent charm and consider [reaching out to us on Matrix](https://matrix.to/#/#cos:ubuntu.com) or [creating an issue in `parca-agent-operator`](https://github.com/canonical/parca-agent-operator/issues).

# Get profiles from a Canonical Kubernetes cluster deployed from a snap

As the parca-agent charm is a machine charm subordinate, you need to use [the parca-agent snap](https://snapcraft.io/parca-agent) directly to scrape profiles from a snapped Canonical Kubernetes cluster.

On the machine where Kubernetes snap is running, install the `parca-agent` snap:

```
sudo snap install parca-agent --classic --channel edge
```

Then configure it to point at parca’s remote store address. You can find it by running `juju status` on the k8s model where parca is deployed:

```
$ juju status
Model       Controller  Cloud/Region        Version  SLA          Timestamp
test-parca  microk8s    microk8s/localhost  3.6.2    unsupported  12:13:14+01:00

App           Version  Status  Scale  Charm             Channel      Rev  Address         Exposed  Message
(...)
parca                  active      1  parca-k8s                        0  10.152.183.105  no       UI ready at http://10.211.88.200:7994
```

Use the same IP address, but at port `7993` for the store address:

```
sudo parca-agent --node="k8s" --remote-store-address="10.211.88.200:7993" --remote-store-insecure
```

Observe in Grafana that the profiles from `parca-agent` are available in the Parca datasource:

---
